Skip to content

🎨 Palette: tab rows get one Tab stop and arrow-key navigation - #366

Merged
Randomname653 merged 1 commit into
mainfrom
palette/tab-row-arrows
Nov 28, 2026
Merged

Randomname653 merged 1 commit into
mainfrom
palette/tab-row-arrows

Conversation

@Randomname653

Copy link
Copy Markdown
Owner

Problem

ui.syncTabRoles (UI audit, 2026-11-14) marks every .cat-tabs / .arr-tabs row as role="tablist" / role="tab", but only Activity implements the WAI-ARIA tabs keyboard model. On the Knowledge Base, Deletions, Recommendations, taste and Swipe rows (WCAG 2.1.1 / 4.1.2 expectations for the tab role):

  • every tab is its own Tab stop (a screen reader announces "tab" and the user expects one stop plus arrows);
  • ArrowLeft/Right/Home/End do nothing;
  • Swipe redraws its tab row with innerHTML on every category change, so a keyboard user who pressed Enter on a tab loses focus to <body>.

Playwright probe (static server, mocked /api, Knowledge Base row), before: tabindex = [null×5]; focus on Overview, ArrowRight → focus stays on Overview; End → stays.

Change

  • syncTabRoles: roving tabindex, 0 on the active tab (first visible if none), -1 on the rest.
  • tabRowKey (ui.js, called from the existing document keydown listener): Arrow/Home/End move focus (manual activation: Enter/Space still picks, as the buttons already do); wraps; skips hidden tabs; ignores modified keys; leaves Activity's row to its own handler.
  • Swipe _renderTabs puts focus back on the active tab if it was on the row.

Measured effect / proof

Same probe after: tabindex = [0,-1,-1,-1,-1]; ArrowRight → focus on "attention"; End → "profiles".

Tests

tests/test_a11y_nav.py::test_tab_rows_roving_and_arrows runs the real syncTabRoles, tabRowKey and _renderTabs in node. Against untouched frontend it fails (functions missing); with the change 45/45 pass. Battery: 356/357 green; test_enrichment_status_perf.py fails in the sandbox (SQLite planner) identically on untouched main.

Risk & edge cases

No visual change. Tabs only gain focus on arrows, no data loads on arrow. .active class changes already trigger the existing 50 ms sync; tabindex writes don't retrigger the observer (class-only filter). Hidden tabs (Activity's Scheduled for non-admins) are skipped.

Duplicate check

Journals of all three personas, git log -300, PR search "tab keyboard" (only unrelated closed PRs #16, #103, #129, #155, #361).


Generated by Claude Code

@Randomname653 Randomname653 mentioned this pull request Nov 28, 2026
@Randomname653
Randomname653 merged commit f910426 into main Nov 28, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants